<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Swift_Errors</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Swift_Errors</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Swift Exception handling object for PHP4</p>
<p class="description"><p>Triggers and/or catches errors</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Chris Corbyn &lt;<a href="mailto:chris@w3style.co.uk">chris@w3style.co.uk</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Swift---Errors.php.html">/Swift/Errors.php</a> (line <span class="field">18</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">array,Swift_Error</span>
					<a href="#$errors" title="details" class="var-name">$errors</a>
				</div>
																<div class="var-title">
					<span class="var-type">boolean</span>
					<a href="#$halt" title="details" class="var-name">$halt</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$try" title="details" class="var-name">$try</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																												
												<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#clear" title="details" class="method-name">clear</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#dumpError" title="details" class="method-name">dumpError</a>
											(<span class="var-type"><a href="../Swift/Swift_Exception.html">Swift_Exception</a></span>&nbsp;<span class="var-name">&$e</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#expect" title="details" class="method-name">expect</a>
											(<span class="var-type">&$e</span>&nbsp;<span class="var-name">&$e</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">&quot;Swift_Exception&quot;</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array,Swift_Exception</span>
										<a href="#getAll" title="details" class="method-name">&amp;getAll</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../Swift/Swift_Errors.html">Swift_Errors</a></span>
										<a href="#getInstance" title="details" class="method-name">&amp;getInstance</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getLast" title="details" class="method-name">getLast</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#halted" title="details" class="method-name">halted</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#reset" title="details" class="method-name">reset</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#trigger" title="details" class="method-name">trigger</a>
											(<span class="var-type"><a href="../Swift/Swift_Exception.html">Swift_Exception</a></span>&nbsp;<span class="var-name">&$e</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$errors" id="$errors"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array,Swift_Error</span>
			<span class="var-name">$errors</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">24</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Caught errors</p>
	
	
		
		

</div>
<a name="var$halt" id="$halt"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">boolean</span>
			<span class="var-name">$halt</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">29</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If an error has been thrown previously and not caught (hack)</p>
	
	
		
		

</div>
<a name="var$try" id="$try"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$try</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">34</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Errors we're expecting, so don't trigger them</p>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodclear" id="clear"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">clear</span> (line <span class="line-number">116</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Clear anything that may have been expected matching $type</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			clear
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: The type</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddumpError" id="dumpError"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">dumpError</span> (line <span class="line-number">95</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Dump the error if it was not caught</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			dumpError
		</span>
					(<span class="var-type"><a href="../Swift/Swift_Exception.html">Swift_Exception</a></span>&nbsp;<span class="var-name">&$e</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Swift/Swift_Exception.html">Swift_Exception</a></span>
				<span class="var-name">&$e</span>			</li>
				</ul>
		
			
	</div>
<a name="methodexpect" id="expect"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">expect</span> (line <span class="line-number">106</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Tell the error handler we're expecting an error of type $type and assign it to $e</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			expect
		</span>
					(<span class="var-type">&$e</span>&nbsp;<span class="var-name">&$e</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">&quot;Swift_Exception&quot;</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">&$e</span>
				<span class="var-name">&$e</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: The type of expection - optional</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetAll" id="getAll"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getAll</span> (line <span class="line-number">145</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get all logged errors as an array</p>
	
	<div class="method-signature">
		<span class="method-result">array,Swift_Exception</span>
		<span class="method-name">
			&amp;getAll
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getInstance</span> (line <span class="line-number">40</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get an instance of this class as a singleton - needed internally</p>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Swift/Swift_Errors.html">Swift_Errors</a></span>
		<span class="method-name">
			&amp;getInstance
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetLast" id="getLast"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getLast</span> (line <span class="line-number">132</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The last error message as a string</p>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getLast
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodhalted" id="halted"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">halted</span> (line <span class="line-number">51</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if things are supposed to have stopped processing because of an</p>
<p class="description"><p>uncaught excpetion</p></p>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			halted
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodreset" id="reset"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">reset</span> (line <span class="line-number">59</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reset everything logged so far</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			reset
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodtrigger" id="trigger"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">trigger</span> (line <span class="line-number">70</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Throw a new exception - it will either be caught or triggered</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			trigger
		</span>
					(<span class="var-type"><a href="../Swift/Swift_Exception.html">Swift_Exception</a></span>&nbsp;<span class="var-name">&$e</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Swift/Swift_Exception.html">Swift_Exception</a></span>
				<span class="var-name">&$e</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 26 Mar 2008 20:33:47 +1100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.1</a>
	</p>
	</div></body>
</html>